/* processtable.h
	A class for holding processes related information in NACHOS
 */

#ifndef PROCESSTABLE_H
#define PROCESSTABLE_H

#include "bitmap.h"
#include "process.h"

class Lock;

class ProcessTable {
	public:
		ProcessTable();
		~ProcessTable();

		Process* createProcess(char* debugName, AddrSpace* space);
		int addProcess(Process* process);
		void removeProcess(int processID);
		int getProcessCount();
		Process* getProcess(int processID);
		char* getName() { return (name); }

	private:
		char* name;
		int processCount;
		Process* processes[MAX_PROCESSES];
		BitMap* processesMap;
		Lock* processesMapLock;
};

#endif
